From 7a5214e43f71b467e398f4c2dfee6d592b505a87 Mon Sep 17 00:00:00 2001 From: ckyrouac Date: Wed, 8 Oct 2025 15:52:28 -0400 Subject: [PATCH] deploy: Use delete_if_present in can_soft_reboot This avoids a dump when trying to delete the ostree= karg if it isn't present. This is an issue with bootc factory reset. Signed-off-by: ckyrouac --- src/libostree/ostree-sysroot-deploy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 3bfc8d9f..81cc6b38 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -4389,8 +4389,8 @@ ostree_sysroot_deployment_can_soft_reboot (OstreeSysroot *self, OstreeDeployment // Compare kargs without the ostree= entry, as that will vary per bootlink even for // the same boot checksum. - g_assert (ostree_kernel_args_delete (booted_kargs, "ostree", NULL)); - g_assert (ostree_kernel_args_delete (target_kargs, "ostree", NULL)); + g_assert (ostree_kernel_args_delete_if_present (booted_kargs, "ostree", NULL)); + g_assert (ostree_kernel_args_delete_if_present (target_kargs, "ostree", NULL)); return _ostree_kernel_args_equal (booted_kargs, target_kargs); } -- 2.30.2